import request from '@/utils/request'

export default {

  list() {
    return request({
      url: `/main/room-time-slice/list`,
      method: 'get'
    })
  },

  reverse(reverseInfo){
    return request({
      url: `/main/room-reservation/reserve`,
      method: 'post',
      data: reverseInfo
    })
  },
  cancelBySliceId(sliceId){
    return request({
      url: `/main/room-reservation/cancelBySliceId/${sliceId}`,
      method: 'get',
    })
  },
  cancel(id){
    return request({
      url: `/main/room-reservation/cancel/${id}`,
      method: 'get',
    })
  },

  getByQuery(querySliceVo){
    return request({
      url: `/main/room-time-slice/getByQuery`,
      method: 'post',
      data: querySliceVo
    })
  },

  getByUserId(id) {
    return request({
      url: `/main/room-reservation/getByUserId/${id}`,
      method: 'get'
    })
  },
}

